package com.yb.xczx.cloud.auth.bean;

import lombok.Data;
import org.springframework.security.oauth2.core.OAuth2Token;

import java.time.Instant;

/**
 * Copyright (C), 2022-2023, 姚兵
 * Author: 32210
 * Date: 2023/5/15 15:06
 * FileName: XczxOauth2Token
 * Description:
 */
@Data
public class XczxOauth2AccessToken implements OAuth2Token {
    private String tokenValue;

    private Instant issuedAt;

    private Instant expiresAt;
    public XczxOauth2AccessToken(String tokenValue){
        this.tokenValue=tokenValue;
    }
    public XczxOauth2AccessToken(){
    }

    public XczxOauth2AccessToken(String tokenValue,Instant issuedAt,Instant expiresAt){
        this.tokenValue=tokenValue;
        this.issuedAt=issuedAt;
        this.expiresAt=expiresAt;
    }

    @Override
    public String getTokenValue() {
        return tokenValue;
    }

    @Override
    public Instant getIssuedAt() {
        return this.issuedAt;
    }

    @Override
    public Instant getExpiresAt() {
        return this.expiresAt;
    }
}
